package com.xr.miniprogram.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xr.miniprogram.domain.MiniProgramService;
import com.xr.miniprogram.domain.vo.MiniProgramServiceVO;

import java.util.List;

public interface IMiniProgramServiceService extends IService<MiniProgramService> {

    /**
    * description: 根据菜单id获取服务详情
    * @author: wls
    * @date: 2023/8/30 15:52
    * @param:
    * @return:
    */
    MiniProgramService getServiceByMenuId(Long menuId);

    /**
    * description: 根据id获取详情
    * @author: wls
    * @date: 2023/9/6 15:18
    * @param:
    * @return:
    */
    MiniProgramService getServiceByServiceId(Long serviceId);

    /**
    * description: 添加服务详情
    * @author: wls
    * @date: 2023/8/30 16:09
    * @param:
    * @return:
    */
    boolean addService(MiniProgramService miniProgramService);

    /**
    * description: 修改服务详情
    * @author: wls
    * @date: 2023/8/30 16:11
    * @param:
    * @return:
    */
    boolean updateService(MiniProgramService miniProgramService);

    /**
     * 获取热门服务 下单次数排序前四
     * @return
     */
    List<MiniProgramServiceVO> getPopular();

    /**
     * 获取精品推荐
     * 获取服务的规格中有折扣的 服务
     * @return
     */
    List<MiniProgramServiceVO> getRecommendation();

    /**
     * 服务被下单次数
     * @return
     */
    Long serviceOrderNumById(Long serviceId);

}
